/**
 * 作者: hxl
 * 日期: 2025-01-15 17:39:53
 * 备注: 事件主表
 */
package com.motu.monstercity.server.game.commondata.event;

import io.vertx.core.json.JsonObject;

public class EventMainModel {
    protected int id; // 事件ID
    protected int keyman; // 关键人员
    protected int eventType; // 事件类型
    protected String reward; // 事件基础奖励 (100001;2)
    protected String rewardPeason; // 奖励人口 (0;3)
    protected String showRoleId; // 表演角色id (0;560001)
    protected String eventParam; // 事件参数 ({{参数类型1,参数值1},{参数类型2,参数值2}})
    protected int eventGroup; // 事件分组

    public EventMainModel() {
    }

    public EventMainModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        keyman = obj.containsKey("keyman") ? obj.getInteger("keyman") : 0;
        eventType = obj.containsKey("event_type") ? obj.getInteger("event_type") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
        rewardPeason = obj.containsKey("reward_peason") ? obj.getString("reward_peason") : "";
        showRoleId = obj.containsKey("show_role_id") ? obj.getString("show_role_id") : "";
        eventParam = obj.containsKey("event_param") ? obj.getString("event_param") : "";
        eventGroup = obj.containsKey("event_group") ? obj.getInteger("event_group") : 0;
    }

    public int getId() {
        return id;
    }

    public int getKeyman() {
        return keyman;
    }

    public int getEventType() {
        return eventType;
    }

    public String getReward() {
        return reward;
    }

    public String getRewardPeason() {
        return rewardPeason;
    }

    public String getShowRoleId() {
        return showRoleId;
    }

    public String getEventParam() {
        return eventParam;
    }

    public int getEventGroup() {
        return eventGroup;
    }

}
